#include "httplib.h"
#include <iostream>
#include <string>

#define SERVER_IP "120.26.57.122"
#define SERVER_PORT 8888
int main()
{
    httplib::Client client(SERVER_IP,SERVER_PORT);//实例化客户端对象

    struct httplib::MultipartFormData item;
    item.name = "file";
    item.filename = "hello.txt";
    item.content_type = "text/plain";
    item.content = "hello!!";//上传文件时，这里给的就是文件内容


    httplib::MultipartFormDataItems items;
    items.push_back(item);

    auto res = client.Post("/multipart",items);
    std::cout<<res->status<<std::endl;
    std::cout<<res->body<<std::endl;
    return 0;
}